package com.test;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * Created by bgt on 2017/7/31.
 */
public class J8 {

    @org.junit.Test
    public void testFile(){
        try {
            Stream<String> stream =Files.lines(Paths.get("url.txt"));
            stream.collect(Collectors.toList()).forEach(System.out::print);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
